<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="共几页" prop="totalPage">
        <el-input v-model="queryParams.totalPage" placeholder="请输入共几页" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="第几页" prop="page">
        <el-input v-model="queryParams.page" placeholder="请输入第几页" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="记录编号" prop="jilbh">
        <el-input v-model="queryParams.jilbh" placeholder="请输入记录编号" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="检测单位名称" prop="jiancdwmc">
        <el-input v-model="queryParams.jiancdwmc" placeholder="请输入检测单位名称" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="工程部位/用途" prop="gongcbwyt">
        <el-input v-model="queryParams.gongcbwyt" placeholder="请输入工程部位/用途" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="样品名称" prop="yangpmc">
        <el-input v-model="queryParams.yangpmc" placeholder="请输入样品名称" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="样品编号" prop="yangpbh">
        <el-input v-model="queryParams.yangpbh" placeholder="请输入样品编号" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="样品数量" prop="yangpsl">
        <el-input v-model="queryParams.yangpsl" placeholder="请输入样品数量" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="样品状态" prop="yangpzt">
        <el-input v-model="queryParams.yangpzt" placeholder="请输入样品状态" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="样品时间" prop="yangpsj">
        <el-date-picker clearable v-model="queryParams.yangpsj" type="date" value-format="yyyy-MM-dd" placeholder="请选择样品时间"></el-date-picker>
      </el-form-item>
      <el-form-item label="试验检测日期" prop="shiyjcrq">
        <el-input v-model="queryParams.shiyjcrq" placeholder="请输入试验检测日期" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="试验条件温度" prop="shiytjwd">
        <el-input v-model="queryParams.shiytjwd" placeholder="请输入试验条件温度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="试验条件湿度" prop="shiytjsd">
        <el-input v-model="queryParams.shiytjsd" placeholder="请输入试验条件湿度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="检测依据" prop="jiancyj">
        <el-input v-model="queryParams.jiancyj" placeholder="请输入检测依据" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="判定依据" prop="pandyj">
        <el-input v-model="queryParams.pandyj" placeholder="请输入判定依据" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="主要仪器设备名称及编号" prop="zhuyyqsbmcjbh">
        <el-input v-model="queryParams.zhuyyqsbmcjbh" placeholder="请输入主要仪器设备名称及编号" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="附加声明" prop="fujsm">
        <el-input v-model="queryParams.fujsm" placeholder="请输入附加声明" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="最大干密度" prop="zuidgmd">
        <el-input v-model="queryParams.zuidgmd" placeholder="请输入最大干密度" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="最佳含水率" prop="zuijhsl">
        <el-input v-model="queryParams.zuijhsl" placeholder="请输入最佳含水率" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="贯入杆面积A" prop="guanrgmj">
        <el-input v-model="queryParams.guanrgmj" placeholder="请输入贯入杆面积A" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="筒号1" prop="tongh1">
        <el-input v-model="queryParams.tongh1" placeholder="请输入筒号1" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="筒号2" prop="tongh2">
        <el-input v-model="queryParams.tongh2" placeholder="请输入筒号2" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="筒号3" prop="tongh3">
        <el-input v-model="queryParams.tongh3" placeholder="请输入筒号3" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="每层击数1" prop="meicjs1">
        <el-input v-model="queryParams.meicjs1" placeholder="请输入每层击数1" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="每层击数2" prop="meicjs2">
        <el-input v-model="queryParams.meicjs2" placeholder="请输入每层击数2" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="每层击数3" prop="meicjs3">
        <el-input v-model="queryParams.meicjs3" placeholder="请输入每层击数3" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="单位压力2.5mm1" prop="danwyl2p5mm1">
        <el-input v-model="queryParams.danwyl2p5mm1" placeholder="请输入单位压力2.5mm1" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="单位压力2.5mm2" prop="danwyl2p5mm2">
        <el-input v-model="queryParams.danwyl2p5mm2" placeholder="请输入单位压力2.5mm2" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="单位压力2.5mm3" prop="danwyl2p5mm3">
        <el-input v-model="queryParams.danwyl2p5mm3" placeholder="请输入单位压力2.5mm3" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR2.5mm1" prop="cbr2p5mm1">
        <el-input v-model="queryParams.cbr2p5mm1" placeholder="请输入CBR2.5mm1" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR2.5mm2" prop="cbr2p5mm2">
        <el-input v-model="queryParams.cbr2p5mm2" placeholder="请输入CBR2.5mm2" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR2.5mm3" prop="cbr2p5mm3">
        <el-input v-model="queryParams.cbr2p5mm3" placeholder="请输入CBR2.5mm3" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="单位压力5.0mm1" prop="danwyl5p0mm1">
        <el-input v-model="queryParams.danwyl5p0mm1" placeholder="请输入单位压力5.0mm1" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="单位压力5.0mm2" prop="danwyl5p0mm2">
        <el-input v-model="queryParams.danwyl5p0mm2" placeholder="请输入单位压力5.0mm2" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="单位压力5.0mm3" prop="danwyl5p0mm3">
        <el-input v-model="queryParams.danwyl5p0mm3" placeholder="请输入单位压力5.0mm3" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR5.0mm1" prop="cbr5p0mm1">
        <el-input v-model="queryParams.cbr5p0mm1" placeholder="请输入CBR5.0mm1" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR5.0mm2" prop="cbr5p0mm2">
        <el-input v-model="queryParams.cbr5p0mm2" placeholder="请输入CBR5.0mm2" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR5.0mm3" prop="cbr5p0mm3">
        <el-input v-model="queryParams.cbr5p0mm3" placeholder="请输入CBR5.0mm3" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR平均值2.5mm" prop="cbrpjz2p5">
        <el-input v-model="queryParams.cbrpjz2p5" placeholder="请输入CBR平均值2.5mm" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CBR平均值5.0mm" prop="cbrpjz5p0">
        <el-input v-model="queryParams.cbrpjz5p0" placeholder="请输入CBR平均值5.0mm" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb5 top-right-btn small-line-height">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['report_tg:tgTdczbjlbeBsInfo:add']">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['report_tg:tgTdczbjlbeBsInfo:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['report_tg:tgTdczbjlbeBsInfo:remove']">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['report_tg:tgTdczbjlbeBsInfo:export']">导出</el-button>
      </el-col>
      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    </el-row>

    <el-table border stripe v-loading="loading" :data="tgTdczbjlbeBsInfoList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="一份excel表格的唯一id(其他的excel主表，都应有此字段）" align="center" prop="excelId" v-if="true" />
      <el-table-column label="共几页" align="center" prop="totalPage" />
      <el-table-column label="第几页" align="center" prop="page" />
      <el-table-column label="记录编号" align="center" prop="jilbh" />
      <el-table-column label="检测单位名称" align="center" prop="jiancdwmc" />
      <el-table-column label="工程部位/用途" align="center" prop="gongcbwyt" />
      <el-table-column label="样品名称" align="center" prop="yangpmc" />
      <el-table-column label="样品编号" align="center" prop="yangpbh" />
      <el-table-column label="样品数量" align="center" prop="yangpsl" />
      <el-table-column label="样品状态" align="center" prop="yangpzt" />
      <el-table-column label="样品时间" align="center" prop="yangpsj" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.yangpsj, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="试验检测日期" align="center" prop="shiyjcrq" />
      <el-table-column label="试验条件温度" align="center" prop="shiytjwd" />
      <el-table-column label="试验条件湿度" align="center" prop="shiytjsd" />
      <el-table-column label="检测依据" align="center" prop="jiancyj" />
      <el-table-column label="判定依据" align="center" prop="pandyj" />
      <el-table-column label="主要仪器设备名称及编号" align="center" prop="zhuyyqsbmcjbh" />
      <el-table-column label="附加声明" align="center" prop="fujsm" />
      <el-table-column label="最大干密度" align="center" prop="zuidgmd" />
      <el-table-column label="最佳含水率" align="center" prop="zuijhsl" />
      <el-table-column label="贯入杆面积A" align="center" prop="guanrgmj" />
      <el-table-column label="筒号1" align="center" prop="tongh1" />
      <el-table-column label="筒号2" align="center" prop="tongh2" />
      <el-table-column label="筒号3" align="center" prop="tongh3" />
      <el-table-column label="每层击数1" align="center" prop="meicjs1" />
      <el-table-column label="每层击数2" align="center" prop="meicjs2" />
      <el-table-column label="每层击数3" align="center" prop="meicjs3" />
      <el-table-column label="单位压力2.5mm1" align="center" prop="danwyl2p5mm1" />
      <el-table-column label="单位压力2.5mm2" align="center" prop="danwyl2p5mm2" />
      <el-table-column label="单位压力2.5mm3" align="center" prop="danwyl2p5mm3" />
      <el-table-column label="CBR2.5mm1" align="center" prop="cbr2p5mm1" />
      <el-table-column label="CBR2.5mm2" align="center" prop="cbr2p5mm2" />
      <el-table-column label="CBR2.5mm3" align="center" prop="cbr2p5mm3" />
      <el-table-column label="单位压力5.0mm1" align="center" prop="danwyl5p0mm1" />
      <el-table-column label="单位压力5.0mm2" align="center" prop="danwyl5p0mm2" />
      <el-table-column label="单位压力5.0mm3" align="center" prop="danwyl5p0mm3" />
      <el-table-column label="CBR5.0mm1" align="center" prop="cbr5p0mm1" />
      <el-table-column label="CBR5.0mm2" align="center" prop="cbr5p0mm2" />
      <el-table-column label="CBR5.0mm3" align="center" prop="cbr5p0mm3" />
      <el-table-column label="CBR平均值2.5mm" align="center" prop="cbrpjz2p5" />
      <el-table-column label="CBR平均值5.0mm" align="center" prop="cbrpjz5p0" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['report_tg:tgTdczbjlbeBsInfo:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['report_tg:tgTdczbjlbeBsInfo:remove']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />

    <!-- 添加或修改土的承载比(CBR)记录二对话框 -->
    <jy-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="共几页" prop="totalPage">
          <el-input v-model="form.totalPage" placeholder="请输入共几页" />
        </el-form-item>
        <el-form-item label="第几页" prop="page">
          <el-input v-model="form.page" placeholder="请输入第几页" />
        </el-form-item>
        <el-form-item label="记录编号" prop="jilbh">
          <el-input v-model="form.jilbh" placeholder="请输入记录编号" />
        </el-form-item>
        <el-form-item label="检测单位名称" prop="jiancdwmc">
          <el-input v-model="form.jiancdwmc" placeholder="请输入检测单位名称" />
        </el-form-item>
        <el-form-item label="工程部位/用途" prop="gongcbwyt">
          <el-input v-model="form.gongcbwyt" placeholder="请输入工程部位/用途" />
        </el-form-item>
        <el-form-item label="样品名称" prop="yangpmc">
          <el-input v-model="form.yangpmc" placeholder="请输入样品名称" />
        </el-form-item>
        <el-form-item label="样品编号" prop="yangpbh">
          <el-input v-model="form.yangpbh" placeholder="请输入样品编号" />
        </el-form-item>
        <el-form-item label="样品数量" prop="yangpsl">
          <el-input v-model="form.yangpsl" placeholder="请输入样品数量" />
        </el-form-item>
        <el-form-item label="样品状态" prop="yangpzt">
          <el-input v-model="form.yangpzt" placeholder="请输入样品状态" />
        </el-form-item>
        <el-form-item label="样品时间" prop="yangpsj">
          <el-date-picker clearable v-model="form.yangpsj" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择样品时间"></el-date-picker>
        </el-form-item>
        <el-form-item label="试验检测日期" prop="shiyjcrq">
          <el-input v-model="form.shiyjcrq" placeholder="请输入试验检测日期" />
        </el-form-item>
        <el-form-item label="试验条件温度" prop="shiytjwd">
          <el-input v-model="form.shiytjwd" placeholder="请输入试验条件温度" />
        </el-form-item>
        <el-form-item label="试验条件湿度" prop="shiytjsd">
          <el-input v-model="form.shiytjsd" placeholder="请输入试验条件湿度" />
        </el-form-item>
        <el-form-item label="检测依据" prop="jiancyj">
          <el-input v-model="form.jiancyj" placeholder="请输入检测依据" />
        </el-form-item>
        <el-form-item label="判定依据" prop="pandyj">
          <el-input v-model="form.pandyj" placeholder="请输入判定依据" />
        </el-form-item>
        <el-form-item label="主要仪器设备名称及编号" prop="zhuyyqsbmcjbh">
          <el-input v-model="form.zhuyyqsbmcjbh" placeholder="请输入主要仪器设备名称及编号" />
        </el-form-item>
        <el-form-item label="附加声明" prop="fujsm">
          <el-input v-model="form.fujsm" placeholder="请输入附加声明" />
        </el-form-item>
        <el-form-item label="最大干密度" prop="zuidgmd">
          <el-input v-model="form.zuidgmd" placeholder="请输入最大干密度" />
        </el-form-item>
        <el-form-item label="最佳含水率" prop="zuijhsl">
          <el-input v-model="form.zuijhsl" placeholder="请输入最佳含水率" />
        </el-form-item>
        <el-form-item label="贯入杆面积A" prop="guanrgmj">
          <el-input v-model="form.guanrgmj" placeholder="请输入贯入杆面积A" />
        </el-form-item>
        <el-form-item label="筒号1" prop="tongh1">
          <el-input v-model="form.tongh1" placeholder="请输入筒号1" />
        </el-form-item>
        <el-form-item label="筒号2" prop="tongh2">
          <el-input v-model="form.tongh2" placeholder="请输入筒号2" />
        </el-form-item>
        <el-form-item label="筒号3" prop="tongh3">
          <el-input v-model="form.tongh3" placeholder="请输入筒号3" />
        </el-form-item>
        <el-form-item label="每层击数1" prop="meicjs1">
          <el-input v-model="form.meicjs1" placeholder="请输入每层击数1" />
        </el-form-item>
        <el-form-item label="每层击数2" prop="meicjs2">
          <el-input v-model="form.meicjs2" placeholder="请输入每层击数2" />
        </el-form-item>
        <el-form-item label="每层击数3" prop="meicjs3">
          <el-input v-model="form.meicjs3" placeholder="请输入每层击数3" />
        </el-form-item>
        <el-form-item label="单位压力2.5mm1" prop="danwyl2p5mm1">
          <el-input v-model="form.danwyl2p5mm1" placeholder="请输入单位压力2.5mm1" />
        </el-form-item>
        <el-form-item label="单位压力2.5mm2" prop="danwyl2p5mm2">
          <el-input v-model="form.danwyl2p5mm2" placeholder="请输入单位压力2.5mm2" />
        </el-form-item>
        <el-form-item label="单位压力2.5mm3" prop="danwyl2p5mm3">
          <el-input v-model="form.danwyl2p5mm3" placeholder="请输入单位压力2.5mm3" />
        </el-form-item>
        <el-form-item label="CBR2.5mm1" prop="cbr2p5mm1">
          <el-input v-model="form.cbr2p5mm1" placeholder="请输入CBR2.5mm1" />
        </el-form-item>
        <el-form-item label="CBR2.5mm2" prop="cbr2p5mm2">
          <el-input v-model="form.cbr2p5mm2" placeholder="请输入CBR2.5mm2" />
        </el-form-item>
        <el-form-item label="CBR2.5mm3" prop="cbr2p5mm3">
          <el-input v-model="form.cbr2p5mm3" placeholder="请输入CBR2.5mm3" />
        </el-form-item>
        <el-form-item label="单位压力5.0mm1" prop="danwyl5p0mm1">
          <el-input v-model="form.danwyl5p0mm1" placeholder="请输入单位压力5.0mm1" />
        </el-form-item>
        <el-form-item label="单位压力5.0mm2" prop="danwyl5p0mm2">
          <el-input v-model="form.danwyl5p0mm2" placeholder="请输入单位压力5.0mm2" />
        </el-form-item>
        <el-form-item label="单位压力5.0mm3" prop="danwyl5p0mm3">
          <el-input v-model="form.danwyl5p0mm3" placeholder="请输入单位压力5.0mm3" />
        </el-form-item>
        <el-form-item label="CBR5.0mm1" prop="cbr5p0mm1">
          <el-input v-model="form.cbr5p0mm1" placeholder="请输入CBR5.0mm1" />
        </el-form-item>
        <el-form-item label="CBR5.0mm2" prop="cbr5p0mm2">
          <el-input v-model="form.cbr5p0mm2" placeholder="请输入CBR5.0mm2" />
        </el-form-item>
        <el-form-item label="CBR5.0mm3" prop="cbr5p0mm3">
          <el-input v-model="form.cbr5p0mm3" placeholder="请输入CBR5.0mm3" />
        </el-form-item>
        <el-form-item label="CBR平均值2.5mm" prop="cbrpjz2p5">
          <el-input v-model="form.cbrpjz2p5" placeholder="请输入CBR平均值2.5mm" />
        </el-form-item>
        <el-form-item label="CBR平均值5.0mm" prop="cbrpjz5p0">
          <el-input v-model="form.cbrpjz5p0" placeholder="请输入CBR平均值5.0mm" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
        <el-button size="small" @click="cancel">取 消</el-button>
      </div>
    </jy-dialog>
  </div>
</template>

<script>
import { listTgTdczbjlbeBsInfo, getTgTdczbjlbeBsInfo, delTgTdczbjlbeBsInfo, addTgTdczbjlbeBsInfo, updateTgTdczbjlbeBsInfo } from "@/api/report_tg/tgTdczbjlbeBsInfo";

export default {
  name: "TgTdczbjlbeBsInfo",
  data() {
    return {
      // 按钮loading
      buttonLoading: false,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 土的承载比(CBR)记录二表格数据
      tgTdczbjlbeBsInfoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        totalPage: undefined,
        page: undefined,
        jilbh: undefined,
        jiancdwmc: undefined,
        gongcbwyt: undefined,
        yangpmc: undefined,
        yangpbh: undefined,
        yangpsl: undefined,
        yangpzt: undefined,
        yangpsj: undefined,
        shiyjcrq: undefined,
        shiytjwd: undefined,
        shiytjsd: undefined,
        jiancyj: undefined,
        pandyj: undefined,
        zhuyyqsbmcjbh: undefined,
        fujsm: undefined,
        zuidgmd: undefined,
        zuijhsl: undefined,
        guanrgmj: undefined,
        tongh1: undefined,
        tongh2: undefined,
        tongh3: undefined,
        meicjs1: undefined,
        meicjs2: undefined,
        meicjs3: undefined,
        danwyl2p5mm1: undefined,
        danwyl2p5mm2: undefined,
        danwyl2p5mm3: undefined,
        cbr2p5mm1: undefined,
        cbr2p5mm2: undefined,
        cbr2p5mm3: undefined,
        danwyl5p0mm1: undefined,
        danwyl5p0mm2: undefined,
        danwyl5p0mm3: undefined,
        cbr5p0mm1: undefined,
        cbr5p0mm2: undefined,
        cbr5p0mm3: undefined,
        cbrpjz2p5: undefined,
        cbrpjz5p0: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        excelId: [{ required: true, message: "一份excel表格的唯一id(其他的excel主表，都应有此字段）不能为空", trigger: "blur" }],
        totalPage: [{ required: true, message: "共几页不能为空", trigger: "blur" }],
        page: [{ required: true, message: "第几页不能为空", trigger: "blur" }],
        jilbh: [{ required: true, message: "记录编号不能为空", trigger: "blur" }],
        jiancdwmc: [{ required: true, message: "检测单位名称不能为空", trigger: "blur" }],
        gongcbwyt: [{ required: true, message: "工程部位/用途不能为空", trigger: "blur" }],
        yangpmc: [{ required: true, message: "样品名称不能为空", trigger: "blur" }],
        yangpbh: [{ required: true, message: "样品编号不能为空", trigger: "blur" }],
        yangpsl: [{ required: true, message: "样品数量不能为空", trigger: "blur" }],
        yangpzt: [{ required: true, message: "样品状态不能为空", trigger: "blur" }],
        yangpsj: [{ required: true, message: "样品时间不能为空", trigger: "blur" }],
        shiyjcrq: [{ required: true, message: "试验检测日期不能为空", trigger: "blur" }],
        shiytjwd: [{ required: true, message: "试验条件温度不能为空", trigger: "blur" }],
        shiytjsd: [{ required: true, message: "试验条件湿度不能为空", trigger: "blur" }],
        jiancyj: [{ required: true, message: "检测依据不能为空", trigger: "blur" }],
        pandyj: [{ required: true, message: "判定依据不能为空", trigger: "blur" }],
        zhuyyqsbmcjbh: [{ required: true, message: "主要仪器设备名称及编号不能为空", trigger: "blur" }],
        fujsm: [{ required: true, message: "附加声明不能为空", trigger: "blur" }],
        zuidgmd: [{ required: true, message: "最大干密度不能为空", trigger: "blur" }],
        zuijhsl: [{ required: true, message: "最佳含水率不能为空", trigger: "blur" }],
        guanrgmj: [{ required: true, message: "贯入杆面积A不能为空", trigger: "blur" }],
        tongh1: [{ required: true, message: "筒号1不能为空", trigger: "blur" }],
        tongh2: [{ required: true, message: "筒号2不能为空", trigger: "blur" }],
        tongh3: [{ required: true, message: "筒号3不能为空", trigger: "blur" }],
        meicjs1: [{ required: true, message: "每层击数1不能为空", trigger: "blur" }],
        meicjs2: [{ required: true, message: "每层击数2不能为空", trigger: "blur" }],
        meicjs3: [{ required: true, message: "每层击数3不能为空", trigger: "blur" }],
        danwyl2p5mm1: [{ required: true, message: "单位压力2.5mm1不能为空", trigger: "blur" }],
        danwyl2p5mm2: [{ required: true, message: "单位压力2.5mm2不能为空", trigger: "blur" }],
        danwyl2p5mm3: [{ required: true, message: "单位压力2.5mm3不能为空", trigger: "blur" }],
        cbr2p5mm1: [{ required: true, message: "CBR2.5mm1不能为空", trigger: "blur" }],
        cbr2p5mm2: [{ required: true, message: "CBR2.5mm2不能为空", trigger: "blur" }],
        cbr2p5mm3: [{ required: true, message: "CBR2.5mm3不能为空", trigger: "blur" }],
        danwyl5p0mm1: [{ required: true, message: "单位压力5.0mm1不能为空", trigger: "blur" }],
        danwyl5p0mm2: [{ required: true, message: "单位压力5.0mm2不能为空", trigger: "blur" }],
        danwyl5p0mm3: [{ required: true, message: "单位压力5.0mm3不能为空", trigger: "blur" }],
        cbr5p0mm1: [{ required: true, message: "CBR5.0mm1不能为空", trigger: "blur" }],
        cbr5p0mm2: [{ required: true, message: "CBR5.0mm2不能为空", trigger: "blur" }],
        cbr5p0mm3: [{ required: true, message: "CBR5.0mm3不能为空", trigger: "blur" }],
        cbrpjz2p5: [{ required: true, message: "CBR平均值2.5mm不能为空", trigger: "blur" }],
        cbrpjz5p0: [{ required: true, message: "CBR平均值5.0mm不能为空", trigger: "blur" }]
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询土的承载比(CBR)记录二列表 */
    getList() {
      this.loading = true;
      listTgTdczbjlbeBsInfo(this.queryParams).then((response) => {
        this.tgTdczbjlbeBsInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        excelId: undefined,
        totalPage: undefined,
        page: undefined,
        jilbh: undefined,
        jiancdwmc: undefined,
        gongcbwyt: undefined,
        yangpmc: undefined,
        yangpbh: undefined,
        yangpsl: undefined,
        yangpzt: undefined,
        yangpsj: undefined,
        shiyjcrq: undefined,
        shiytjwd: undefined,
        shiytjsd: undefined,
        jiancyj: undefined,
        pandyj: undefined,
        zhuyyqsbmcjbh: undefined,
        fujsm: undefined,
        delFlag: undefined,
        createBy: undefined,
        createTime: undefined,
        updateBy: undefined,
        updateTime: undefined,
        zuidgmd: undefined,
        zuijhsl: undefined,
        guanrgmj: undefined,
        tongh1: undefined,
        tongh2: undefined,
        tongh3: undefined,
        meicjs1: undefined,
        meicjs2: undefined,
        meicjs3: undefined,
        danwyl2p5mm1: undefined,
        danwyl2p5mm2: undefined,
        danwyl2p5mm3: undefined,
        cbr2p5mm1: undefined,
        cbr2p5mm2: undefined,
        cbr2p5mm3: undefined,
        danwyl5p0mm1: undefined,
        danwyl5p0mm2: undefined,
        danwyl5p0mm3: undefined,
        cbr5p0mm1: undefined,
        cbr5p0mm2: undefined,
        cbr5p0mm3: undefined,
        cbrpjz2p5: undefined,
        cbrpjz5p0: undefined
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.excelId);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加土的承载比(CBR)记录二";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.loading = true;
      this.reset();
      const excelId = row.excelId || this.ids;
      getTgTdczbjlbeBsInfo(excelId).then((response) => {
        this.loading = false;
        this.form = response.data;
        this.open = true;
        this.title = "修改土的承载比(CBR)记录二";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          this.buttonLoading = true;
          if (this.form.excelId != null) {
            updateTgTdczbjlbeBsInfo(this.form)
              .then((response) => {
                this.$modal.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              })
              .finally(() => {
                this.buttonLoading = false;
              });
          } else {
            addTgTdczbjlbeBsInfo(this.form)
              .then((response) => {
                this.$modal.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              })
              .finally(() => {
                this.buttonLoading = false;
              });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const excelIds = row.excelId || this.ids;
      this.$modal
        .confirm('是否确认删除土的承载比(CBR)记录二编号为"' + excelIds + '"的数据项？')
        .then(() => {
          this.loading = true;
          return delTgTdczbjlbeBsInfo(excelIds);
        })
        .then(() => {
          this.loading = false;
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {})
        .finally(() => {
          this.loading = false;
        });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "report_tg/tgTdczbjlbeBsInfo/export",
        {
          ...this.queryParams
        },
        `tgTdczbjlbeBsInfo_${new Date().getTime()}.xlsx`
      );
    }
  }
};
</script>
